﻿using Besture.Bll;
using Besture.Common;
using Besture.Common.Helper;


namespace Besture.UI.Admin
{
    public partial class Login : BasePage
    {
        public string returnUrl = string.Empty;
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected override void InitialLoad()
        {
            returnUrl = StringHelper.Query("returnUrl");
            if (string.IsNullOrEmpty(returnUrl))
            {
                returnUrl = AdminService.ADMIN_INDEX;
            }
            else
            {
                returnUrl = Server.UrlDecode(returnUrl);
            }
            //读取Cookie
            string loginName = CookieHelper.GetCookie(Constants.COOKIE_ADMIN_USER_LOGINNAME);
            //记住用户名
            if (!string.IsNullOrEmpty(loginName))
            {
                txtLoginName.Text = loginName;
                cbRemember.Checked = true;
            }
            else
            {
                cbRemember.Checked = false;
            }
        }

        /// <summary>
        /// 回发
        /// </summary>
        protected override void PostBackLoad()
        {

        }

    }
}